Skip to content

Conversation

@jianzhangbjz
Copy link
Member

Description of the change:
This PR fixes the unit test timeouts in pkg/controller/operators and pkg/controller/operators/openshift packages that occur after the K8s 1.35 upgrade.

Motivation for the change:
To address openshift/operator-framework-olm#1208 (comment)

Architectural changes:

After upgrading to K8s 1.35, the WatchListClient feature gate is enabled by default. However, envtest environments don't fully support WatchList semantics, causing informer caches to hang indefinitely while waiting for sync. This results in test timeouts after 10 minutes:

panic: test timed out after 10m0s                                                                                                                                       
    running tests:                                                                                                                                                      
        TestAPIs (10m0s)                                                                                                                                                
FAIL    github.com/operator-framework/operator-lifecycle-manager/pkg/controller/operators    600.143s                                                                   

Add TestMain function to disable the WatchListClient feature gate before tests run, forcing informers to use the traditional List+Watch behavior instead of the new WatchList semantics.

Testing remarks:

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Bug fixes are accompanied by regression test(s)
  • e2e tests and flake fixes are accompanied evidence of flake testing, e.g. executing the test 100(0) times
  • tech debt/todo is accompanied by issue link(s) in comments in the surrounding code
  • Tests are comprehensible, e.g. Ginkgo DSL is being used appropriately
  • Docs updated or added to /doc
  • Commit messages sensible and descriptive
  • Tests marked as [FLAKE] are truly flaky and have an issue
  • Code is properly formatted

Assisted-By: Claude-COde

@openshift-ci
Copy link

openshift-ci bot commented Jan 29, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign tmshort for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant